package com.dnjn.happiness.survey.api;

import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import com.dnjn.happiness.survey.api.factory.RemoteSurveyRecordFallbackFactory;
import com.dnjn.happiness.survey.api.model.StatisticalAnalysisModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteSurveyRecordService", value = ServiceNameConstants.SURVEY_SERVICE, fallbackFactory = RemoteSurveyRecordFallbackFactory.class)
public interface RemoteSurveyRecordService {

    @GetMapping("/admin/record/getSurveyRecordNotJoin/{userId}/{time}")
    public R<Integer> getSurveyRecordNotJoin(@PathVariable("userId") Long userId,@PathVariable("time") String time, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/admin/record/selectGradeByX/{userId}{time}/{recordScore}/{x}/{y}")
    public R<Double> selectGradeByX(@PathVariable("userId") Long userId,@PathVariable("time") String time,@PathVariable("recordScore") double recordScore,@PathVariable("x") double x,@PathVariable("y") double y, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
